1. Field of the Invention
The present invention relates to an information processing method and an information processing apparatus, for example, a processing method of determining the region of an object contained in print data.
2. Description of the Related Art
In general, an operating system (to be referred to as an OS hereinafter) installed in a host computer includes a printing system for supporting printing in an environment in which a printer is connected to the PC which issues a print request. As such a printing system, a CUPS (Common UNIX® Printing System) operating on Mac OS X® available from Apple Inc., U.S.A. is known. Mac OS X® uses PDF (Portable Document Format®) as the standard data format of a spool file created by the OS in accordance with a print request from an application.
In general, a printer cannot directly interpret a spool file, and hence the printing system or printer driver converts the data format of the file into that which can be interpreted by the printer. When, for example, a raster printer such as an ink-jet printer performs printing, the following processing is performed. The data conversion unit of a printer driver processes the spool file created by the OS in accordance with a print request from an application. The raster data creation unit of the OS then converts the resultant data into raster data. The print data creation unit of the printer driver converts this raster data into a data format that can be interpreted by the printer, and sends the data to the printer via the back-end, thereby printing the data. In this manner, in CUPS, several processing units sequentially perform processing in cooperation with each other to convert the data format, thereby printing the data. The processing sequence of these processing units is determined by the system.
Some printer drivers perform image processing in accordance with an object such as a bitmap or text contained in print data in order to allow the printer to print with higher image quality. Such a printer driver receives print data in a page description language (to be referred to as a PDL hereinafter) from an OS, and interprets its print command to recognize an object such as a bitmap or text contained in print data. The printer driver then performs image processing corresponding to each object in accordance with the recognition result and prints the result (see, for example, Japanese Patent Laid-Open No. 2002-247367).
Consider a case in which a CUPS for a raster printer like that described above performs image processing for print data which can be printed by the printer, in accordance with an object contained in print data. In this case, the print data creation unit of the printer driver needs to identify an object contained in the print data and determine its region. However, since the print data creation unit receives the raster data created by the raster data creation unit of the OS, it is generally difficult to determine the region of an object contained in the print data. It is necessary to perform complex calculation to interpret raster data and determine the region of an object. However, the print data creation unit cannot always determine the region of an object correctly. In addition, when the background color of a bitmap object contained in print data is the same as that of a page, the print data creation unit may not correctly determine the region of the object.
Consider the possibility of the determination of the region of an object by the data conversion unit of the printer driver described above. This data conversion unit corresponds to cupsPrefilter added by CUPS 1.3 in Mac OS X Leopard 10.5. The data conversion unit receives a spool file in PDF as an input, which is print data before conversion to raster data by the raster data creation unit of the OS, and outputs data in PDF. The print data creation unit of the printer driver receives this output data. It may seem possible to determine the region of an object contained in print data by interpreting the internal command of the PDF data.
There is, however, one problem in this case. According to the specifications of Mac OS, the raster data creation unit provided by the OS performs operations associated with pages, such as page imposition, enlargement/reduction, and feed sequence, which can be set at the time of printing. For this reason, it is not possible to directly use the region of an object obtained by causing the data conversion unit of the printer driver to analyze a spool file in PDF. This is because, operations such as page imposition, enlargement/reduction, and feed sequence, executed by the raster data creation unit, are not reflected in the spool file, and this data does not generally match raster data transferred to the print data creation unit of the printer driver. In order to match the two data, it is necessary to grasp the detailed specifications of the raster data creation unit of the OS and perform coordinate calculation upon performing processing similar to that performed by the raster data creation unit. However, since the specifications of the raster data creation unit are not disclosed to the public, it is generally difficult to perform this operation.